
package DBLayer;
import ModelLayer.Machine;
import java.util.ArrayList;

/**
 * @version 12/22/2011
 * @author Gruppe 4
 */

public interface IFDBMachine {
    
    /**
     * Method to find all machines from the database
     * @param ()
     * @return Returns an ArrayList<Machine>
     */
    public ArrayList<Machine> getAllMachines();
    
     /**
     * Method to find a Machine object in the database
     * @param machineId int machineId the machineId of the machine
     * @return returns an Object of type Machine
     */
    public Machine findMachine(int machineId, boolean retrieveAssociation);
    
    /**
     * Method to find a Machine object in the database
     * @param name String name the name of the machine
     * @return returns an Object of type Machine
     */
    public Machine searchMachineName(String name, boolean retrieveAssociation);
    
    /**
     * Method to insert a Machine object into the database
     * @param machineObj an Object of the type Machine
     * @return returns an int 1 if the method succedes and -1 if the method fails
     */
    public int insertMachine(Machine machineObj);
    
    /**
     * Method to update a Machine in the database;
     * @param machine an Object of the type Machine
     * @return returns an int 1 if the method succedes and -1 if the method fails
     */
    public int updateMachine(Machine machine);
    
    /**
     * Method to delete a Machine from the database
     * @param machineId int machineId the id of the machine
     * @return returns an int 1 if the method succedes and -1 if the method fails
     */
    public int deleteMachine(int machineId);
}
